package ee.serge.shared;

import javax.jdo.annotations.PersistenceCapable;
import javax.jdo.annotations.Persistent;
import javax.jdo.annotations.PrimaryKey;

import com.google.appengine.api.datastore.Text;
import com.google.gwt.user.client.rpc.IsSerializable;

@PersistenceCapable
public class Article implements IsSerializable {

   @PrimaryKey
   @Persistent
   private String type;
   @Persistent
   private Text text;
   
   public Article() {}

   public Article(String type, String text) {
      super();
      this.text = new Text(text);
      this.type = type;
   }

   public String getType() {
      return type;
   }

   public void setType(String type) {
      this.type = type;
   }

   public String getText() {
      return text.getValue();
   }

   public void setText(String value) {
      this.text = new Text(value);
   }
   
   
   
}
